package com.mc.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mc.dao.newsandbulletinMapper;
import com.mc.model.newsandbulletin;
import com.mc.service.NewsandbulletService;
@Service
public class NewsandbulletServiceImpl implements NewsandbulletService {
	
	@Autowired
    private newsandbulletinMapper newsandbulletinMapper;
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return newsandbulletinMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(newsandbulletin record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insertSelective(newsandbulletin record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public newsandbulletin selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return newsandbulletinMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(newsandbulletin record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(newsandbulletin record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(newsandbulletin record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void insertNorB(newsandbulletin record) {
		newsandbulletinMapper.insertNorB(record);
	}

	@Override
	public List<newsandbulletin> selectAllNews() {
		// TODO Auto-generated method stub
		return newsandbulletinMapper.selectAllNews();
	}

	
	@Override
	public List<newsandbulletin> selectAllBulletin() {
		// TODO Auto-generated method stub
		return newsandbulletinMapper.selectAllBulletin();
	}

	@Override
	public int selectAllNewsCount() {
		// TODO Auto-generated method stub
		return newsandbulletinMapper.selectAllNewsCount();
	}

	@Override
	public int selectAllBulletinCount() {
		// TODO Auto-generated method stub
		return newsandbulletinMapper.selectAllBulletinCount();
	}

	@Override
	public List<newsandbulletin> getIndexNews() {
		return newsandbulletinMapper.getIndexNews();
	}


	@Override
	public int CountNewsByType(String type) {
		return newsandbulletinMapper.CountNewsByType(type);
	}

	@Override
	public int CountBulletinByType(String type) {
		return newsandbulletinMapper.CountBulletinByType(type);
	}


	@Override
	public List<newsandbulletin> getCommonBulletin(int page, int pageSize) {
		int start = (page-1)*pageSize;
		return newsandbulletinMapper.getCommonBulletin(start, pageSize);
	}

	@Override
	public List<newsandbulletin> getCommonNews(int page, int pageSize) {
		int start = (page-1)*pageSize;
		return newsandbulletinMapper.getCommonNews(start, pageSize);
	}

	@Override
	public List<newsandbulletin> GetNewsByType(String type) {
		return newsandbulletinMapper.GetNewsByType(type);
	}

	@Override
	public List<newsandbulletin> getBulletinByType(String type) {
		return newsandbulletinMapper.getBulletinByType(type);
	}

	@Override
	public void updateNorB(newsandbulletin nb) {
		// TODO Auto-generated method stub
		
	}

}
